package com.framework.demo.config;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import javax.annotation.PostConstruct;

/**
 * @author LIN
 * @date 2021-05-10
 */
public class Bean implements InitializingBean, DisposableBean {

    @PostConstruct
    public void init(){
        System.out.println(this.getClass().getName()+":初始化");
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("destroy");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("afterSet");
    }
}
